package com.xizi.秋招笔试;

/**
 * @author xizizzz
 * @description: TODO
 * @date 2021-8-11下午 07:38
 */
public class J {
    public static void main(String[] args) {

    }

    public static long ans(int[] array, int k) {
        long res = 0;
        for (int i = 0; i < array.length; i++) {
            for (int j = i + 1; j < array.length; j++) {
                if (array[i] + array[j] < k) {
                    res++;
                }
            }
        }
        return res;
    }
}
